package com.tlb.dto;

import com.tlb.dto.Post;
import com.tlb.dto.Moniker;
import java.io.Serializable;
import javax.persistence.*;

@Entity
@Table(name="postcontent")
public class PostContent implements Serializable {
    public PostContent() {
    }
    
    @Id
    private int postId;

    @OneToOne
    @JoinColumn(name="monikerId")
    private Moniker moniker;

    @OneToOne
    @JoinColumn(name="postId")
    private Post post;
    
        
    private String title;
    private String content;
    
        
    public int hashCode() {
        return postId * 23;
    }

    public int getPostId() {
        return postId;
    }

    public void setPostId(int postId) {
        this.postId = postId;
    }

    public Moniker getMoniker() {
        return moniker;
    }

    public void setMoniker(Moniker moniker) {
        this.moniker = moniker;
    }


    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Post getPost() {
        return post;
    }

    public void setPost(Post post) {
        this.post = post;
    }

    
}


